# -*- encoding:utf-8 -*-
# @time:2022-11-07 21:50
# @Author : serein
# @Email: serein@qq.com
# @File:urls.py
# @Software: PyCharm

#如果路由不同就要重新写个path
from rest_framework.routers import DefaultRouter

from address.views import AreaViewSet,AddressViews
urlpatterns = []
#路由器的简写是建立在视图使用view.model上面的
router = DefaultRouter()#创建路由器
router.register('Area',AreaViewSet)
router.register('Address',AddressViews,basename='address')
urlpatterns += router.urls#拼接路由器
